package br.com.daniele.bean;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToOne;

import com.thoughtworks.xstream.annotations.XStreamAlias;

@XStreamAlias(value = "nfeProc")
@Entity
public class NfeProc {

	private long id;
	private NFe NFe;
	private ProtNFe protNFe;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	@OneToOne(cascade = CascadeType.PERSIST, fetch = FetchType.EAGER)
	public NFe getNFe() {
		return NFe;
	}

	public void setNFe(NFe nFe) {
		NFe = nFe;
	}

	@OneToOne(cascade = CascadeType.PERSIST)
	public ProtNFe getProtNFe() {
		return protNFe;
	}

	public void setProtNFe(ProtNFe protNFe) {
		this.protNFe = protNFe;
	}

}
